-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial robot template implementation. #722
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple ROBOT-template backed implementation. .. note:: Highly incomplete! This provides a minimal implementation of some interfaces using a collection of ROBOT tenplates as a backend. One of the main driving use cases here is to enable KGCL commands with ontologies that use ROBOT templates. For example, the `OBI templates folder on GitHub <https://github.com/obi-ontology/obi/tree/016ca67c7e6f31a048780cee56afde24d4af7125/src/ontology/templates>`_ contains a collection of ROBOT templates. - assays.tsv - biobank-specimens.tsv - ... Assuming these are in a local path ``templates``, you can use a selector: .. code-block:: bash runoak -i robottemplate:templates COMMAND ... Note that this does NOT trigger compilation of the templates into OWL - this implementation works on the templates as a collection of TSVs, facilitating update operations. Currently very few operations are supported, but you can do basic things like: .. code-block:: bash runoak -i robottemplate:templates info OBI:0002516 OBI:0002516 ! brain specimen You can also apply KGCL commands: .. code-block:: bash runoak -i robottemplate:templates apply \ "rename OBI:0002516 from 'brain specimen' to 'brain sample'" -o new_templates This will create a new copy of all templates in ``new_templates``, with the label column modified in biobank-specimens.tsv .. warning:: only a small subset of KGCL is implemented so far.
Skipping patcher test until INCATools/kgcl#64 is fixed
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #722 +/- ##
==========================================
- Coverage 75.49% 74.99% -0.50%
==========================================
Files 269 272 +3
Lines 31443 31843 +400
==========================================
+ Hits 23737 23882 +145
- Misses 7706 7961 +255 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ROBOT Template Adapter
This is experimental and incomplete.
This is an extension of the TabularInterface adapter that provides
access to a collection of ROBOT templates.
Note that it does NOT use the ROBOT tool itself to access these, it
uses custom code that only implements a portion of the spec.
One of the main driving use cases here is to enable KGCL commands with
ontologies that use ROBOT templates.
For example, the OBI templates folder on
GitHub
contains a collection of ROBOT templates.
Assuming these are in a local path
my/path/templates
, you can use aselector:
Or in python:
Note that this does NOT trigger compilation of the templates into OWL -
this implementation works on the templates as a collection of TSVs,
facilitating update operations.
Command Line Examples
From here we assume your templates are in a local folder
./templates
.Basic operations
Currently very few operations are supported, but you can do basic things
like:
Returns:
Or limited search:
Returns:
Applying KGCL commands
You can also apply KGCL commands:
This will create a new copy of all templates in
new_templates
, withthe label column modified in biobank-specimens.tsv
only a small subset of KGCL is implemented so far